Skip to content

fix: keep the blank lines between the members of a union or intersection type - #925

Merged
dsherret merged 1 commit into
mainfrom
fix-union-blank-lines
Nov 13, 2026
Merged

dsherret merged 1 commit into
mainfrom
fix-union-blank-lines

Conversation

@dsherret

Copy link
Copy Markdown
Member

Closes #920

Stacked on #924.

The blank lines between the members of a multi-line union or intersection type were removed. They're now kept up to maxBlankLines like the blank lines between statements, object properties and class members:

export type K =
  // First
  | A.ONE
  | A.TWO

  // Second
  | A.THREE
  | A.FOUR;

This works with the operator at the start or the end of the line. A type that ends up on a single line or hanging doesn't keep them.

@dsherret
dsherret added this pull request to stack #927 November 13, 2026 22:38
@dsherret
dsherret force-pushed the fix-union-blank-lines branch from 801969c to dedf755 Compare November 13, 2026 22:41
@dsherret
dsherret force-pushed the fix-union-blank-lines branch from dedf755 to 487e685 Compare November 13, 2026 22:45
Base automatically changed from fix-block-comment-before-argument to main November 13, 2026 22:46
@dsherret
dsherret force-pushed the fix-union-blank-lines branch from 487e685 to 1dde254 Compare November 13, 2026 22:46
@dsherret
dsherret merged commit ba889ea into main Nov 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blank lines between the members of a union type are removed

1 participant